#!/bin/sh

# You can access your bundled files at the following paths:
#
# "$1/Contents/Resources/ROMdetok"
# "$1/Contents/Resources/CocoaDialog.app"
#
#
CD="$1/Contents/Resources/CocoaDialog.app/Contents/MacOS/CocoaDialog"
DT="$1/Contents/Resources/DIDcopier"

infile=`"$CD" fileselect \
    --text "Choose the PC ROM file" \
    --with-extensions .rom`
if [ -n "$infile" ]; then  ### if has a non-zero length
    echo "ROM file: $infile"    
else
    exit
fi

outfile=`"$CD" fileselect \
    --text "Choose the Mac ROM file to modify" \
    --with-extensions .rom`
if [ -n "$outfile" ]; then  ### if has a non-zero length
    echo "ROM file: $outfile"    
else
    exit
fi

$1/Contents/Resources/strapcopier $infile $outfile

rv=`"$CD" ok-msgbox --text "Softstraps Replaced!" \
    --no-cancel`


